<html lang="zh-cn" style="font-size: 55.2px;">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <link rel="icon" href="favicon.ico">
    <title>Welcome Indeed Mall</title>
    <link rel="stylesheet" href="/statics/css/base.css">
    <link href="/statics/css/chunk-vendors.c3991080.css" rel="stylesheet">
    <link href="/statics/css/app.bad77f0c.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/index/css/common.css">
    <script src="/static/jquery-3.5.0.min.js"></script>
    <script src="/static/layer/layer.js"></script>
    <style>
        #register{
            background-image: url(/statics/img/entry-bg-common-1.23ff7742.jpg);
        }
        #register .sponsorGroup{
            background-image: url(/statics/img/sponsor.7cad03a5.png);
        }
        #register .entry-top .logo{
            background-image: url(/statics/img/logo.959266fb.png);
        }
        #register .entryMain{
            position: static !important;
            width: auto !important;
        }
    </style>
</head>

<body class="">
    <style>
        #loadingContainer {
            position: fixed;
            width: 100%;
            height: 100%;
            z-index: 999999;
            background: #ffffff;
            display: none;
        }
    </style>
    <div id="app">
        <div data-v-67bfd721="" id="register">
            <div data-v-67bfd721="" class="entry-top">
                <div data-v-67bfd721="" class="logo"></div>
            </div>
            <div data-v-67bfd721="">
                <div data-v-67bfd721="" class="sponsorTxtGroup"><span data-v-67bfd721="" class="line"></span><span
                        data-v-67bfd721="" class="title">Sponsor partner</span><span data-v-67bfd721=""
                        class="line"></span></div>
                <div data-v-67bfd721="" class="sponsorGroup"></div>
            </div>
            <div data-v-67bfd721="" style="overflow: hidden;">
                <div data-v-67bfd721="" class="entryMain registerAnimated">
                    <div data-v-67bfd721="" class="formContainer" style="display:none;">
                        <div data-v-67bfd721="" class="content normalLoginContent">
                            <div data-v-67bfd721="" class="registerTitle">Sign in</div>
                            <form data-v-67bfd721="" class="form">
                                <div data-v-67bfd721="" class="inputBox">
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon accountIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="User name or mobile number" maxlength="32" spellcheck="false" type="text"
                                                style="display: block;"></div>
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Login password" autocomplete="on" maxlength="32" spellcheck="false"
                                                type="password" style="display: block;"></div>
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Verification Code" maxlength="4" spellcheck="false" type="text"
                                                style="display: block;"></div>
                                        <div data-v-67bfd721="" class="inputCaptcha"><img data-v-67bfd721=""
                                                src="">
                                        </div>
                                    </div>
                                </div>
                                <div data-v-67bfd721="" class="otherOperate">
                                    <div data-v-67bfd721="" class="rememberPwdBox"><span data-v-67bfd721=""
                                            class="turnOff"></span><span data-v-67bfd721="">Remember the account number</span></div><span
                                        data-v-67bfd721="" style="font-size: 12px;">Forgot your password?</span>
                                </div>
                                <div data-v-67bfd721="" class="btnGroup"><button data-v-67bfd721=""
                                        type="button">Sign in</button></div>
                                <div data-v-67bfd721="" class="visitorBtn"><a data-v-67bfd721=""
                                        style="font-size: 0.24rem; color: rgb(255, 255, 255);">Go Home</a></div>
                            </form>
                        </div>
                        <div data-v-67bfd721="" class="locationToRight">
                            <div data-v-67bfd721="" class="locationContent">
                                <div data-v-67bfd721="" class="linkRegisterIcon"></div>
                                <div data-v-67bfd721="" class="text">
                                    Sign in
                                </div>
                            </div>
                        </div>
                    </div>
                    <div data-v-67bfd721="" class="formContainer">
                        <div data-v-67bfd721="" class="locationToLeft" onclick="location.href = '/en/login/index.html'">
                            <div data-v-67bfd721="" class="locationContent">
                                <div data-v-67bfd721="" class="linkRegisterIcon"></div>
                                <div data-v-67bfd721="" class="text"><span
                                        data-v-67bfd721="">Sign in</span></div>
                            </div>
                        </div>
                        <div data-v-67bfd721="" class="content registerContent">
                            <div data-v-67bfd721="" class="registerTitle">register</div>
                            <form data-v-67bfd721="" class="form">
                                <div data-v-67bfd721="" class="inputBox">
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon accountIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain">
                                            <input data-v-67bfd721=""
                                                placeholder="enter one user name" style="display: block;" name="username" onchange="check_username()" maxlength="140" step="" enterkeyhint="done" autocomplete="off" type="">
                                        </div>
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon accountIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input
                                                data-v-67bfd721="" placeholder="Please enter your mobile number" name="phone" onchange="check_phone()" maxlength="11" step="" enterkeyhint="done" autocomplete="off" type=""
                                                style="display: block;"></div>
                                    </div>
                                     <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Verification Code" maxlength="4" spellcheck="false" type="text"
                                                style="display: block;"></div>
                                        <!--<div data-v-67bfd721="" class="inputCaptcha">-->
                                           <span id="Send" class="getCode actives" style="color: #fff;"><span> Send </span></span>
                                        <!--</div>-->
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Please input a password" name="password" maxlength="140" step="" enterkeyhint="done" autocomplete="off" type="password" placeholder=" Enter password" style="display: block;"></div>
                                                
                                    </div>
                                     <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Please enter the password again" name="password2" maxlength="140" step="" enterkeyhint="done" autocomplete="off" type="password" placeholder=" Enter password" style="display: block;"></div>
                                                
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon passwordIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain"><input data-v-67bfd721=""
                                                placeholder="Please enter the password for rush payment" class="jymm" name="payment"  maxlength="6" step="" enterkeyhint="done" autocomplete="off" type="text" placeholder="Input 6 Arabic numerals" style="display: block;"></div>
                                    </div>
                                    <div data-v-67bfd721="" class="inputGroup">
                                        <div data-v-67bfd721="" class="inputIcon accountIcon"></div>
                                        <div data-v-67bfd721="" class="inputMain">
                                            <!--<input data-v-67bfd721=""-->
                                            <!--    placeholder="邀请码" maxlength="32" spellcheck="false" type="text"-->
                                            <!--    style="display: block;">-->
                                             {present name="invite"}
                                                <input data-v-67bfd721="" name="invite_code" maxlength="6" step="0.000000000000000001" enterkeyhint="done" pattern="[0-9]*" type="number" class="uni-input-input" value="{$invite}" readOnly="true">
                                                {else /}
                                                <input data-v-67bfd721="" name="invite_code" maxlength="6" step="0.000000000000000001" enterkeyhint="done" pattern="[0-9]*" autocomplete="off" type="number" class="uni-input-input" placeholder="Invitation code">
                                                {/present}
                                        </div>
                                    </div>
                                </div>
                                <div data-v-67bfd721="" class="btnGroup reg"><button data-v-67bfd721=""
                                        type="button">register</button></div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="/static/jquery.cookie.js"></script>

<script>
$('.jymm').on('input propertychange', function(e) {

var text = $(this).val().replace(/[^\d]/g, "");

$(this).val(text)   

})
    $(function () {
        if ($.cookie("captcha")) {
            var count = $.cookie("captcha");
            $('#Send').text("(" + count + ")S").attr('disabled', true);
            var resend = setInterval(function () {
                count--;
                if (count > 0) {
                    $('#Send').text("(" + count + ")S").attr('disabled', true);
                    $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
                } else {
                    clearInterval(resend);
                    $('#Send').text("Send").addClass("active");
                }
            }, 1000);
        }

        $(document).on("click", ".active", function () {
            var phone = $("input[ name='phone']").val();
            var type = 1;
            if (phone && type){
                layer.load(2);
                $.ajax({
                    url: "{:Url('sms_code')}",
                    type: "post",
                    traditional: true,
                    data: {phone:phone,type:type},
                    success: function (e) {
                        layer.closeAll('loading');
                        if (e.code === 1) {
                            layer.msg(e.msg);
                            var btn = $(this);
                            var count = 10;
                            var resend = setInterval(function () {
                                count--;
                                if (count > 0) {
                                    $('#Send').text("(" + count + ")S").attr('disabled', true);
                                    $('#Send').removeClass("active");
                                    $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
                                } else {
                                    clearInterval(resend);
                                    $('#Send').text("Send").addClass("active");
                                }
                            }, 1000);
                            btn.attr('disabled', true).css('cursor', 'not-allowed');
                        } else {
                            layer.msg(e.msg, function () {
                                return false;
                            });
                        }
                    },
                });
            }else {
                layer.msg('Mobile number cannot be empty', function(){
                });
            }
        });
    });
</script>

<script>
    function check_username() {
        var username = $("input[ name='username']").val();
        layer.load(2);
        $.ajax({
            url: "{:Url('check_username')}",
            type: "post",
            traditional: true,
            data: {username: username},
            success: function (e) {
                layer.closeAll('loading');
                if (e.code === 0){
                    layer.msg(e.msg, function(){
                        $("input[ name='username']").val('');
                    });
                }
            },
        });
    }

    function check_phone() {
        var phone = $("input[ name='phone']").val();
        layer.load(2);
        $.ajax({
            url: "{:Url('check_phone')}",
            type: "post",
            traditional: true,
            data: {phone: phone},
            success: function (e) {
                layer.closeAll('loading');
                if (e.code === 0){
                    layer.msg(e.msg, function(){
                        $("input[ name='phone']").val('');
                    });
                }else {
                    $("#Send").addClass("active");
                }
            },
        });
    }
</script>

<script>
var phone = '';
var password = ''
    $(document).on("click", ".reg", function () {
        var username = $("input[ name='username']").val();
        phone = $("input[ name='phone']").val();
        var code = $("input[ name='code']").val();
        password = $("input[ name='password']").val();
        var payment = $("input[ name='payment']").val();
        var invite_code = $("input[ name='invite_code']").val();
        var password2 = $("input[ name='password2']").val();
        if(password != password2){
            layer.msg('The two passwords are inconsistent. Please re-enter', {
                            time: 2000,
                            end: function () {
                               
                            }
                        });
            return false
        }
        if (payment.length != 6){
            layer.msg('The transaction password is 6 digits', function () {
                return false;
            });
            return false
        }
           if (!invite_code || invite_code == ''){
            layer.msg('Please fill in the invitation code', function () {
                return false;
            });
            return false
        }
            layer.load(2);
            $.ajax({
                url: "{:Url('reg')}",
                type: "post",
                traditional: true,
                data: {username: username, phone: phone, code:code,password: password,payment:payment,invite_code:invite_code},
                success: function (e) {
                    layer.closeAll('loading');
                    if (e.code === 1) {
                        // window.location.href = "/index/index/index.html";
                        layer.msg(e.msg, {
                            time: 2000,
                            end: function () {
                                //  window.location.href = "{:Url('index/index')}";
                                logins()
                            }
                        });
                        
                    } else {
                        layer.msg(e.msg, function () {
                            return false;
                        });
                    }
                },
            });
    });
    function logins(){
        $.ajax({
            url: "{:Url('login/index')}",
            type: "post",
            traditional: true,
            data: {account: phone, password: password},
            success: function (e) {
                layer.closeAll('loading');
                if (e.code === 1) {
                    // layer.msg(e.msg, {
                    //     end: function () {
                            window.location.href = "{:Url('index/index')}";
                        // }
                    // });
                } else {
                    layer.msg(e.msg, function () {
                        return false;
                    });
                }
            },
        });
    }
</script>
</html>